/*!
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 *
 * Modifications Copyright OpenSearch Contributors. See
 * GitHub history for details.
 */

.ouiResizablePanel {
  position: relative;
}

@each $modifier, $amount in $ouiPanelPaddingModifiers {
  .ouiResizablePanel--#{$modifier} {
    padding: $amount;
  }
}

.ouiResizablePanel__content {
  height: 100%;

  // Manually remove the border for default theme
  &:not([class*='plain']) {
    border-width: 0;
  }
}

.ouiResizablePanel__content--scrollable {
  @include ouiScrollBar;
  overflow-y: auto;
}

.ouiResizablePanel-isCollapsed {
  overflow: hidden;

  .ouiResizablePanel__content * {
    display: none;
  }
}

.ouiResizableContainer--horizontal {
  .ouiResizablePanel-isCollapsed {
    min-width: 0 !important; // sass-lint:disable-line no-important
  }

  .ouiResizablePanel--collapsible.ouiResizablePanel-isCollapsed {
    min-width: $ouiSizeL !important; // sass-lint:disable-line no-important
  }
}

.ouiResizableContainer--vertical {
  .ouiResizablePanel-isCollapsed {
    min-height: 0 !important; // sass-lint:disable-line no-important
  }

  .ouiResizablePanel--collapsible.ouiResizablePanel-isCollapsed {
    min-height: $ouiSizeL !important; // sass-lint:disable-line no-important
  }
}
